<template>
  <i class="iconfont icon-container" :class="fontClass"></i>
</template>
<script>
const classMap = {
  home: 'iconzhuye',
  success: 'iconzhengque',
  error: 'iconcuowu',
  close: 'iconguanbi',
  warn: 'iconjinggao',
  info: 'iconxinxi',
  blog: 'iconblog',
  code: 'iconcode',
  about: 'iconset_about_hov',
  weixin: 'iconweixin',
  mail: 'iconemail',
  github: 'icongithub',
  qq: 'iconsign_qq',
  arrowUp: 'iconiconfonticonfonti2copy',
  arrowDown: 'iconiconfonticonfonti2',
  empty: 'iconempty',
  chat: 'iconliuyan'
}
export const types = Object.keys(classMap)
</script>
<script setup>
import { computed } from 'vue'

const props = defineProps({
  type: {
    type: String,
    required: true
  }
})
const fontClass = computed(() => {
  // 图标类样式
  return classMap[props.type]
})
</script>

<style scoped>
@import '//at.alicdn.com/t/font_2164449_nalfgtq7il.css';

.iconfont {
  color: inherit;
  font-size: inherit;
}
</style>
